package com.Mt.Serviceimpl;

import com.Mt.Service.Mt_UserMoneyService;
import com.Mt.mapper.MT_MoneyMapper;
import com.Mt.pojo.Mt_Money;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class Mt_UserMoneyServiceimpl implements Mt_UserMoneyService {

    @Autowired
   private MT_MoneyMapper moneyMapper;


    @Override
    public Mt_Money queryById(String userid) {

        return moneyMapper.queryById(userid);
    }

    /**
     * 新用户登录添加
     *
     * @param userid
     */
    @Override
    public int newMoney(String userid) {
        return moneyMapper.newMoney(userid);
    }

    /**
     * 充钱100元子
     *
     * @param userid
     */
    @Override
    public int cq(String userid) {
        return moneyMapper.cq(userid);
    }

    /**
     * 消费
     *
     * @param userid
     * @param price
     */
    @Override
    public int sopping(String userid, int price) {
        return moneyMapper.sopping(userid, price);
    }
}
